import request from '@/utils/request'

export function loginByUsername(id, password) {
  const data = {
    id,
    password
  }
  return request({
    url: '/sys/auth/login',
    method: 'post',
    data
  })
}

export function logout() {
  return request({
    url: '/sys/auth/logout',
    method: 'post'
  })
}

export function getUserInfo(token) {
  return request({
    url: '/sys/auth/info',
    method: 'get'
    // ,
    // params: { token }
  })
}

export function getTenantFno() {
  return request({
    url: '/smartPhone/getTenantFno',
    method: 'get'
  })
}

// 获取菜单
export function getMenus(token) {
  return request({
    url: '/screen/getDynamicMenu',
    method: 'get',
    params: { token }
  })
}

